home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-19 / gpt32src.zip / SURFACE1.DEM < prev    next >
Text File  |  1992-03-25  |  3KB  |  125 lines

  1. #
  2. # $Id: surface1.demo,v 3.26 92/03/24 22:32:25 woo Exp Locker: woo $
  3. #
  4. set samples 21
  5. set isosample 11
  6. set xlabel "X axis" -3,-2
  7. set ylabel "Y axis" 3,-2
  8. set zlabel "Z axis" -5
  9. set title "3D gnu plot demo"
  10. set label 1 "This is the surface boundary" at -20,-5,210
  11. set arrow 1 from -10,-5,220 to -10,0,0 nohead
  12. set arrow 2 from -10,-5,220 to 10,0,0 nohead
  13. set arrow 3 from -10,-5,220 to 0,10,0 nohead
  14. set arrow 4 from -10,-5,220 to 0,-10,0 nohead
  15. splot x*y
  16. pause -1 "Hit return to continue (1)"
  17. set noarrow
  18. set nolabel
  19. set grid
  20. splot x**2+y**2, x**2-y**2
  21. pause -1 "Hit return to continue (2)"
  22. rep x*y
  23. pause -1 "Hit return to continue (3)"
  24. rep (x**3+y**3)/10
  25. pause -1 "Hit return to continue (4)"
  26. set ticslevel 0.0
  27. set title "3D gnu plot demo ( ticslevel = 0.0 )"
  28. rep
  29. pause -1 "Hit return to continue (5)"
  30. set ticslevel 2.0
  31. set title "3D gnu plot demo ( ticslevel = 2.0 )"
  32. rep
  33. pause -1 "Hit return to continue (6)"
  34. set ticslevel 0.5
  35. set title "3D gnu plot demo ( ticslevel = 0.5 )"
  36. rep
  37. pause -1 "Hit return to continue (7)"
  38. set title "3D gnu plot demo"
  39. set nogrid
  40. splot x*y with points
  41. pause -1 "Hit return to continue (8)"
  42. set noxtics
  43. set noytics
  44. set xrange [-1:1]
  45. set yrange [-1:1]
  46. set title "Surfaces with no grid or tics"
  47. splot x*y with lines, x**2*y**3 with dots, x**3*y*2 with points
  48. pause -1 "Hit return to continue (9)"
  49. set xtics ("low" -3, "mid" 0, "high" 3)
  50. set ytics -2,0.5,2
  51. set xrange [-3:3]
  52. set yrange [-3:3]
  53. set log z
  54. set title "Surfaces with z log scale"
  55. splot x**2*y**2 + 2, x**2*y**4 + 2, x**4*y**2 + 2
  56. pause -1 "Hit return to continue (10)"
  57. set nolog z
  58. set xtics
  59. set ytics
  60. set xrange [-1:1]
  61. set yrange [-1:1]
  62. set samples 51
  63. set isosample 21
  64. set dummy u,v
  65. set title "3D gnu plot demo"
  66. splot u*v / (u**2 + v**2 + 0.1)
  67. pause -1 "Hit return to continue (11)"
  68. splot [x=-3:3] [y=-3:3] sin(x) * cos(y)
  69. pause -1 "Hit return to continue (12)"
  70. set zrange [-0.35:0.35]
  71. replot
  72. pause -1 "Hit return to continue (13)"
  73. set title "Sinc function"
  74. set label 1 "This is equal to 1" at -5,-2,0.75 right
  75. set arrow 1 from -5,-2.1,0.75 to 0,0,1
  76. sinc(u,v) = sin(sqrt(u**2+v**2)) / sqrt(u**2+v**2)
  77. splot [-5:5.01] [-5:5.01] sinc(u,v)
  78. pause -1 "Hit return to continue (14)"
  79. set view 70,20,1
  80. set zrange [-0.5:1.0]
  81. set ztics -1,0.25,1
  82. set label 1 "This is equal to 1" at -5,-2,1.5 centre
  83. set arrow 1 from -5,-2.1,1.4 to 0,0,1
  84. splot [-12:12.01] [-12:12.01] sinc(u,v)
  85. pause -1 "Hit return to continue (15)"
  86. set noarrow
  87. set ztics
  88. set nolabel
  89. set log
  90. set auto
  91. set title "This has logarithmic scale"
  92. splot [x=1:15] [y=1:15] x**2+y**2
  93. pause -1 "Hit return to continue (16)"
  94. set nolog
  95. set xrange [0:15]
  96. set yrange [0:15]
  97. set auto
  98. set zrange [-0.6:0.6]
  99. set data style lines
  100. set title "Data grid plotting"
  101. set parametric
  102. splot "glass.dat"
  103. pause -1 "Hit return to continue (17)"
  104. splot "glass.dat" using 3:2:1
  105. pause -1 "Hit return to continue (18)"
  106. set zrange [-1.2:1.2]
  107. set noparametric
  108. splot "glass.dat" using 1, "glass.dat" using 2, "glass.dat" using 3
  109. pause -1 "Hit return to continue (19)"
  110.  
  111. #
  112. # Clean up:
  113. #
  114. set samples 100
  115. set isosamples 10
  116. set view 60,30,1,1
  117. set xrange [-10:10]
  118. set yrange [-10:10]
  119. set zrange [-10:10]
  120. set auto
  121. set title "" 0,0
  122. set xlabel "" 0,0
  123. set ylabel "" 0,0
  124. set zlabel "" 0,0
  125.